
import { orgTreeSelect } from "@/api/system/dept";
import { listFirstParty } from "@/api/lease/firstParty";

export const contractMixin = {
  data(){
    return {
      //出租房屋字典
      orgOptions:[],
      //甲方(出租房字典)
      firstPartyOptions:[]
    }
  },
  created() {
    this.getTreeselect()
  },
  methods: {
    /** 查询出租房产下拉树结构 */
    getTreeselect() {
      //这个是视图的数据
      orgTreeSelect({'modelType':"'dept','community','floor','unit','room'"}).then(response => {
        this.orgOptions = response.data;
      });
    },
    //查询合同类型字典
    selectContractCategory(v){
      this.form.partyId = null
      listFirstParty({contractCategoryId: v,whereDefault:'Y'}).then(res=>{
        this.firstPartyOptions = res.rows
      })
    },
    //合同
    clickPartyId(){

    },
  }

}
